package logic

import (
	"context"
	"hire/models/mysql"

	"hire/hirerpc/hirerpc"
	"hire/hirerpc/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type PublishDelLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewPublishDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PublishDelLogic {
	return &PublishDelLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *PublishDelLogic) PublishDel(in *hirerpc.PublishDelRequest) (*hirerpc.PublishDelResponse, error) {
	// todo: add your logic here and delete this line
	mysql.DB.Debug().Where("id=?", in.PublishId).Find(&mysql.Publish{})
	return &hirerpc.PublishDelResponse{}, nil
}
